{include file="/sum/common/script" /}

<div id="addEdit" class="faq-form" v-cloak>
    <el-container class="panel-block">
        <el-main>
            <el-scrollbar height="100%">
                <el-form :model="form.model" :rules="form.rules" ref="formRef" label-width="100px">
                    <el-form-item label="封面" prop="image">
                        <sa-uploader v-model="form.model.image" type="size" @success="onSuccess"></sa-uploader>
                        <div class="warning"> 建议尺寸：750*750 px </div>
                    </el-form-item>

                    <el-form-item label="名称" prop="name">
                        <el-input class="sa-w-360" v-model="form.model.name" placeholder="请输入名称"></el-input>
                        <el-input class="hide" v-model="form.model.video_id" ></el-input>
                    </el-form-item>

                    <el-form-item label="价格" prop="price">
                        <el-input class="sa-w-360" v-model="form.model.price" placeholder="请输入单集价格" type="number">
                            <template #append>金币</template>
                        </el-input>
                    </el-form-item>

                    <el-form-item label="视频" prop="video_url">
                        <sa-uploader v-model="form.model.video_url" type="size" @success="onSuccess"></sa-uploader>
                    </el-form-item>

                    <el-form-item label="排序(集数)" prop="weigh">
                        <el-input class="sa-w-360" v-model="form.model.weigh" placeholder="请输入排序(集数)" type="number">
                        </el-input>
                        <div class="warning"> 剧集的集数 </div>
                    </el-form-item>

                    <el-form-item label="是否推荐">
                        <el-switch v-model="form.model.is_recommend" :active-value="1" :inactive-value="0"></el-switch>
                        <div class="warning"> 免费的剧集才会出现在推荐列表 </div>
                    </el-form-item>

                    <el-form-item label="状态" required>
                        <el-radio-group v-model="form.model.status">
                            <el-radio label="normal">正常</el-radio>
                            <el-radio label="hidden">隐藏</el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-form>
            </el-scrollbar>
        </el-main>
        <el-footer class="sa-footer--submit sa-flex sa-row-right">
            <el-button type="primary" @click="onConfirm">确定</el-button>
        </el-footer>
    </el-container>
</div>